Skip to content

feat(cli): load project from .chainloop.yaml#3065

Open
waveywaves wants to merge 1 commit into
chainloop-dev:mainfrom
waveywaves:feat/chainloop-yaml-org-project
Open

feat(cli): load project from .chainloop.yaml#3065
waveywaves wants to merge 1 commit into
chainloop-dev:mainfrom
waveywaves:feat/chainloop-yaml-org-project

Conversation

@waveywaves

@waveywaves waveywaves commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Allow chainloop attestation init to load the project name from .chainloop.yaml when --project is omitted.
  • Preserve precedence: CLI flag over repository configuration.

Fixes #3063

Assisted-by: pi

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/cli/cmd/config.go">

<violation number="1" location="app/cli/cmd/config.go:165">
P2: Added `.chainloop` `organization` field is unused, causing a silent no-op that can mislead users.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread app/cli/cmd/config.go Outdated
type DotChainloopConfig struct {
ProjectVersion string `yaml:"projectVersion"`
Project string `yaml:"project"`
Organization string `yaml:"organization"`

@cubic-dev-ai cubic-dev-ai Bot Apr 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Added .chainloop organization field is unused, causing a silent no-op that can mislead users.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/cli/cmd/config.go, line 165:

<comment>Added `.chainloop` `organization` field is unused, causing a silent no-op that can mislead users.</comment>

<file context>
@@ -161,4 +161,6 @@ func isDir(filename string) bool {
 type DotChainloopConfig struct {
 	ProjectVersion string `yaml:"projectVersion"`
+	Project        string `yaml:"project"`
+	Organization   string `yaml:"organization"`
 }
</file context>
Fix with Cubic

@waveywaves waveywaves force-pushed the feat/chainloop-yaml-org-project branch from 2abca03 to 50ce228 Compare April 21, 2026 10:27
@waveywaves waveywaves marked this pull request as ready for review April 21, 2026 16:18
@waveywaves

Copy link
Copy Markdown
Contributor Author

@migmartri @jiparis Ready for review. Extends .chainloop.yaml to support a project field — same precedence pattern as projectVersion (CLI flag > config > default). Organization field left for follow-up due to gRPC connection lifecycle constraints. All commits GPG-signed.

@waveywaves waveywaves force-pushed the feat/chainloop-yaml-org-project branch 2 times, most recently from 299cc6b to c78092b Compare April 29, 2026 15:17
@waveywaves waveywaves force-pushed the feat/chainloop-yaml-org-project branch from c78092b to 458d7c7 Compare May 17, 2026 19:27
@waveywaves waveywaves force-pushed the feat/chainloop-yaml-org-project branch from 458d7c7 to e1ace05 Compare June 30, 2026 11:16
Allow attestation init to use the project configured in .chainloop.yaml when
--project is omitted, while preserving CLI flag precedence.

Fixes: chainloop-dev#3063

Assisted-by: pi
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
@waveywaves waveywaves force-pushed the feat/chainloop-yaml-org-project branch from e1ace05 to d2a5d38 Compare July 14, 2026 11:20
@waveywaves waveywaves changed the title feat(cli): allow setting project name in .chainloop.yaml feat(cli): load project from .chainloop.yaml Jul 14, 2026
@migmartri migmartri requested a review from a team July 15, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: allow to force project and organization in .chainloop.yaml

1 participant